package Arrays.DiGui;

public class Demo01 {
    // 递归
    public static void main(String[] args) {
        int result = get(8);
        System.out.println(result);

        int result2 = getMoenky(1);
        System.out.println(result2);
    }

    public static int get(int num){
        if (num == 1 || num == 2){
            return 1;
        }else {
            return get(num-2) + get(num-1);
        }
    }

    //猴子吃桃
    public static int getMoenky(int day){
        if (day == 10){
            return 1;
        }else {
            return (getMoenky(day+1)+1)*2;
        }
    }


}
